import {FunctionComponent} from "react";

export interface RouterConfig {
    label: string,
    type: 'router' | 'iframe' | 'redirect'
    path: string // 通用 路由Hash
    url?: string // iframe | iframe
    component?: FunctionComponent // router | redirect 模式 两种模式实现方式相同，为了渲染菜单过滤重定向
}

export interface MenuInterface {
    /**
     * @params 菜单数据
     **/
    menu: RouterConfig[],
    /**
     * @params 当前面包屑
     **/
    breadcrumbs: string[] | number[],
    menuList: any,
    menuMapping: any,

    [key: string]: any;
}

// import Components from "../../config/components";
/**
 * 陈夕 2:06 下午
 * desc: 路由列表demo数据
 **/
// const demoMenuList = () => {
//     let list: Array<RouterConfig> = [];
//     list.push({label: '首页大屏', type: 'router', path: '/home', component: Components['/home']});
//     list.push({label: '房源管理', type: 'router', path: '/house', component: Components['/house']});
//     list.push({label: '带看流程', type: 'router', path: '/process', component: Components['/process']});
//     list.push({label: '审计', type: 'router', path: '/audit', component: Components['/audit']});
//     list.push({label: '商品', type: 'router', path: '/product', component: Components['/product']});
//     list.push({label: '公客私客盘', type: 'router', path: '/sourcePool', component: Components['/sourcePool']});
//     list.push({label: '用户管理', type: 'router', path: '/user', component: Components['/user']});
//     list.push({label: '角色', type: 'router', path: '/roles', component: Components['/roles']});
//     list.push({label: '个人中心', type: 'router', path: '/person', component: Components['/person']});
//     list.push({label: '推广', type: 'router', path: '/promote', component: Components['/promote']});
// // 默认地址
//     list.push({label: '默认跳转', type: 'redirect', path: '/', component: Components['/home']});
//
//     return list;
// }